package com.onetech.adrewards.free.fragments;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.onetech.adrewards.free.R;
import com.onetech.adrewards.free.dialogs.GuideDialogFragment.DoAction;

public class ImageGuideFragment2 extends Fragment implements OnClickListener{
	public static final String EXTRA_MESSAGE = "EXTRA_MESSAGE";
	private int imageResource;
	private ImageView mGetPointBtn=null;
	private static DoAction doAction=null;
	public static final ImageGuideFragment2 newInstance(String message,
			int _imageResource, DoAction _doAction) {
		ImageGuideFragment2 f = new ImageGuideFragment2();
		f.imageResource = _imageResource;
		doAction=_doAction;
		return f;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		final View mView=inflater.inflate(R.layout.heplp_exchange_success_layout, container, false);
		//ImageView image = new ImageView(getActivity());	
//		ImageView image = new ImageView(getActivity());
//		image.setBackgroundResource(imageResource);
//		
//		LinearLayout layout = new LinearLayout(getActivity());
//		layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
//				LayoutParams.FILL_PARENT));
//
//		layout.setGravity(Gravity.CENTER);
//		layout.addView(image);
		mGetPointBtn=(ImageView)mView.findViewById(R.id.btnGetPoints);
		mGetPointBtn.setOnClickListener(this);
		return mView;

	}

	@Override
	public void onClick(View v) {
		try {
			doAction.DissmissDialog();			
		} catch (Exception e) {
		}	
	}

}
